function show_menu(){
        var sub_menu = document.getElementById('sub_menu');
        sub_menu.style.display="block";
    }
    function hide_menu(){
        var sub_menu = document.getElementById('sub_menu');
        sub_menu.style.display="none";
    }

	$(document).ready(function(){
		$("#contact-mail-page").validate({
			rules:{
				txtName: {
					required: true,
					minlength: 2
				},
				txtEmail:{
					required: true,
					email: true
				},
				txtSubject:{
					required: true,
					minlength: 5
				}
			},
			messages:{
				txtName:{
					required: 'Your name can not be blank.',
					minlength: 'You must enter more than 2 letters in "Your name" field.'
				},
				txtEmail:{
					required: 'You must enter email address.',
					email: 'Email is incorrect! (e.g: mail@gmail.com).'
				},
				txtSubject:{
					required: 'Subject can not be blank',
					minlength: 'Subject to short, please enter more than 5 letters!'
				}
			}
		});
	});
function getImage(str)
{
    document.getElementById("load_gallery").innerHTML= '<div id="featureCarousel"><img src= "../images/loading.gif" class="load_image"></div>';
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
            document.getElementById("load_gallery").innerHTML= xmlhttp.responseText;
            $(document).ready(function() {

                $("#featureCarousel").featureCarousel({
                    largeFeatureWidth :     430,
                    largeFeatureHeight:		300,
                    smallFeatureWidth:      .5,
                    smallFeatureHeight:		.5,
                    topPadding:             30,
                    sidePadding:            70,
                    smallFeatureOffset:		50,
                    startingFeature:        1,
                    carouselSpeed:          900,
                    autoPlay:               0,
                    counterStyle:           0,
                    preload:                true,
                    displayCutoff:          0,
                    animationEasing:        'swing'
                });
            });
        }
      }
    xmlhttp.open("GET","../action/load_gallery.php?id="+str);
    xmlhttp.send();
}
$(document).ready(function() {

    $("#featureCarousel").featureCarousel({
        largeFeatureWidth :     430,
        largeFeatureHeight:		300,
        smallFeatureWidth:      .5,
        smallFeatureHeight:		.5,
        topPadding:             30,
        sidePadding:            70,
        smallFeatureOffset:		50,
        startingFeature:        1,
        carouselSpeed:          900,
        autoPlay:               0,
        counterStyle:           0,
        preload:                true,
        displayCutoff:          0,
        animationEasing:        'swing'
    });
    jQuery('#mycarousel').jcarousel
    $.preloadCssImages();
});